home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / MazeCraze.dxr / 00007_rotating gate Left to Up.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.2 KB  |  53 lines

  1. property spriteNum, pGoDown, pKount, pPaused, pCatchTimer, pFrame
  2.  
  3. on beginSprite
  4.   pKount = 1
  5.   pGoDown = 1
  6.   pPaused = 1
  7.   pCatchTimer = the timer
  8. end
  9.  
  10. on exitFrame me
  11.   if pPaused = 0 then
  12.     pKount = pKount + 1
  13.     sprite(35).loc = sprite(spriteNum).loc
  14.     sprite(35).rotation = sprite(spriteNum).rotation
  15.     sprite(35).skew = sprite(spriteNum).skew
  16.     if pGoDown = 1 then
  17.       if pKount > 4 then
  18.         pFrame = pFrame + 1
  19.         pKount = 1
  20.         if pFrame <= 7 then
  21.           sprite(spriteNum).member = "LefttoUp0" & pFrame
  22.           sprite(35).member = "LefttoUp_alpha0" & pFrame
  23.         end if
  24.       end if
  25.       if pFrame > 7 then
  26.         pKount = 1
  27.         pGoDown = 0
  28.         pPaused = 1
  29.         pCatchTimer = the timer
  30.       end if
  31.     else
  32.       if pKount > 4 then
  33.         pFrame = pFrame - 1
  34.         pKount = 1
  35.         if pFrame >= 1 then
  36.           sprite(spriteNum).member = "LefttoUp0" & pFrame
  37.           sprite(35).member = "LefttoUp_alpha0" & pFrame
  38.         end if
  39.       end if
  40.       if pFrame < 1 then
  41.         pKount = 1
  42.         pGoDown = 1
  43.         pPaused = 1
  44.         pCatchTimer = the timer
  45.       end if
  46.     end if
  47.   else
  48.     if the timer > (pCatchTimer + random(120) + 50) then
  49.       pPaused = 0
  50.     end if
  51.   end if
  52. end
  53.